package com.awesomeproject2.rn;

import androidx.annotation.NonNull;

import com.facebook.react.BuildConfig;
import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;

public class AppModule extends ReactContextBaseJavaModule {
    public  AppModule (@NonNull ReactApplicationContext reactContext){
        super((reactContext));
    }
    @NonNull
    @Override
    public String getName() {
        return "App";
    }

    // 注册打开相册的原生方法
    @ReactMethod
    public void openGallery(){
        if(getCurrentActivity() == null){
            return;
        }
        com.demo.newarchitecture.utils.DeviceUtil.openGallery(getCurrentActivity());
    }
    


}
